import request from '@/utils/request';

export function selectAll() {
  return request({
    url: `/MaintenanceRecord/fenduan/selectAll`,
    method: 'get'
  });
}

export function addFenduan(data) {
  return request({
    url: `/MaintenanceRecord/fenduan/add`,
    method: 'post',
    data: data
  });
}

export function updateFenduan(recordid, data) {
  return request({
    url: `/MaintenanceRecord/fenduan/update/${recordid}`,
    method: 'put',
    data: data
  });
}

// 删除（逻辑删除）
export function deleteFenduan(recordid) {
  return request({
    url: `/MaintenanceRecord/fenduan/delete/${recordid}`,
    method: 'delete'
  });
}

export function downloadFenduan() {
  return request({
    url: `/MaintenanceRecord/fenduan/download`,
    method: 'GET',
    responseType: 'blob'
  });
}